// match_page.h
#ifndef MATCH_PAGE_H
#define MATCH_PAGE_H

#include "main.h"

class MatchPage
{
private:
    // 取消按钮参数
    const int cancel_x = 250;
    const int cancel_y = 350;
    const int cancel_w = 300;
    const int cancel_h = 60;

public:
    MatchPage() = default;
    void display(Lcd *lcd);
    bool handle_cancel(Touch *touch);      // 判断是否点击取消按钮
    bool check_cancel_click(Touch *touch); // 非阻塞式检查取消按钮点击

    // 绘制返回按钮

    static void drawReturnButton(Lcd *lcd, int x, int y, int width, int height);

    // 检查返回按钮点击的实现
    static bool checkReturnButtonClick(Touch *touch, int x, int y, int width, int height);
};

#endif